﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BIS.Utility.DAL.DataMapper;
using BIS.Utility.Converter;

namespace BIS.Portal.Modules.CMS.Entity
{
    public class AdminCmsArticleDisplaySpecialEntity :IEntity
    {
         #region PrivateMember
        private int _article_id;
        private string _page_alias;
        private string _thumb_image;
        private string _full_image;
        private DateTime _post_update;
        private int _is_hot_article;
        private DateTime _last_update;
        private string _last_update_by;
        private int _status;
        private int _language_in_use_id;
        private string _article_content;
        private string _article_meta_keyword;
        private int _view_count;
        private string _article_title;
        private string _article_description;
        private int _special_priority;
        private string _display_type_name;

        #endregion

        #region Properties

        public int Article_id
        {
            get { return _article_id; }
            set { _article_id = value; }
        }

        public string Page_alias
        {
            get { return _page_alias; }
            set { _page_alias = value; }
        }

        public string Thumb_image
        {
            get { return _thumb_image; }
            set { _thumb_image = value; }
        }

        public string Full_image
        {
            get { return _full_image; }
            set { _full_image = value; }
        }

        public DateTime Post_date
        {
            get { return _post_update; }
            set { _post_update = value; }
        }

        public int Is_hot_article
        {
            get { return _is_hot_article; }
            set { _is_hot_article = value; }
        }

        public DateTime Last_date
        {
            get { return _last_update; }
            set { _last_update = value; }
        }

        public string Last_update_by
        {
            get { return _last_update_by; }
            set { _last_update_by = value; }
        }

        public int Status
        {
            get { return _status; }
            set { _status = value; }
        }

        public int Language_in_use_id
        {
            get { return _language_in_use_id; }
            set { _language_in_use_id = value; }
        }

        public string Article_content
        {
            get { return _article_content; }
            set { _article_content = value; }
        }

        public string Article_meta_keyword
        {
            get { return _article_meta_keyword; }
            set { _article_meta_keyword = value; }
        }

        public int View_count
        {
            get { return _view_count; }
            set { _view_count = value; }
        }

        public string Article_title
        {
            get { return _article_title; }
            set { _article_title = value; }
        }

        public string Article_description
        {
            get { return _article_description; }
            set { _article_description = value; }
        }

        public int Special_priority
        {
            get { return _special_priority; }
            set { _special_priority = value; }
        }

        public string Display_type_name
        {
            get { return _display_type_name; }
            set { _display_type_name = value; }
        }

        #endregion



        #region Constructors

        public AdminCmsArticleDisplaySpecialEntity()
        {
        }

        public AdminCmsArticleDisplaySpecialEntity(int articleId, string pageAlias, string thumbImage, string fullImage, DateTime postUpdate, int isHotArticle, DateTime lastUpdate, string lastUpdateBy, int status, int languageInUseId, string articleContent, string articleMetaKeyword, int viewCount, string articleTitle, string articleDescription, int specialPriority, string displayTypeName)
        {
            _article_id = articleId;
            _page_alias = pageAlias;
            _thumb_image = thumbImage;
            _full_image = fullImage;
            _post_update = postUpdate;
            _is_hot_article = isHotArticle;
            _last_update = lastUpdate;
            _last_update_by = lastUpdateBy;
            _status = status;
            _language_in_use_id = languageInUseId;
            _article_content = articleContent;
            _article_meta_keyword = articleMetaKeyword;
            _view_count = viewCount;
            _article_title = articleTitle;
            _article_description = articleDescription;
            _special_priority = specialPriority;
            _display_type_name = displayTypeName;
        }

        #endregion

        #region Implement
        public void Fill(System.Data.IDataReader reader)
        {
            Article_id = Functions.GetInt(reader["article_id"]);
            Page_alias = Functions.GetString(reader["page_alias"]);
            Thumb_image = Functions.GetString(reader["thumb_image"]);
            Full_image = Functions.GetString(reader["full_image"]);
            Post_date = Functions.GetDateTime(reader["post_date"]);
            Is_hot_article = Functions.GetInt(reader["is_hot_article"]);
            Last_date = Functions.GetDateTime(reader["last_update"]);
            Last_update_by = Functions.GetString(reader["last_update_by"]);
            Status = Functions.GetInt(reader["status"]);
            Article_title = Functions.GetString(reader["article_title"]);
            Article_description = Functions.GetString(reader["article_description"]);
            Article_meta_keyword = Functions.GetString(reader["article_meta_keyword"]);
            Language_in_use_id = Functions.GetInt(reader["language_in_use_id"]);
            Article_content = Functions.GetString(reader["article_content"]);           
            //View_count = Functions.GetInt(reader["view_count"]);            
            Special_priority = Functions.GetInt(reader["special_priority"]);
            Display_type_name = Functions.GetString(reader["display_type_name"]);
        }

        #endregion

    }
}
